<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="h" %>

<h:body title="course view">
	<div class="c_block">
		<div class="title"><c:out value="${course.name}" /></div>
		<div class="row">
		    <div class="simple_l">Дисциплина:</div>
		    <div class="simple_r"><c:out value="${course.discipline.shortName}" /></div>
		</div>
		<div class="row">
			<div class="simple_l">Допонительно:</div>
			<div class="simple_r"><c:out value="${course.info}" /></div>
		</div>
		<div class="section_name">Лекции:</div>
		<c:forEach var="lection" items="${course.lections}" varStatus="status">
			<div class="row">
			  <div class="simple_l"><a href="<c:url value="/course/${course.id}/lection/${status.index}"/>"><c:out value="${lection.name}" /></a></div>
			  <div class="simple_r"><a href="<c:url value="/course/${course.id}/lection/${status.index}/delete"/>">Delete</a></div>
		 	</div>
		</c:forEach>
		<span class="last">
			<a href="<c:url value="/course/"/>">К списку курсов</a>
		   	<a href="<c:url value="/course/${course.id}/lection/new"/>">Создать лекцию</a>
		</span>
	</div>
</h:body>
